﻿using EPiServer.DataAbstraction;
using EPiServer.DataAnnotations;

namespace StarterKit.Web.Models.Pages
{
    /// <summary>
    /// Presents a news section including a list of the most recent articles on the site
    /// </summary>
    [ContentType(
        DisplayName = "News Page",
        Description = "News Page Description",
        GroupName = "Default",
        Order = 100)]
    public class NewsPageData : BasePageData
    {
        //[Display(
        //    Order = 305)]
        //public virtual PageListBlock NewsList { get; set; }

        public override void SetDefaultValues(ContentType contentType)
        {
            base.SetDefaultValues(contentType);

            //NewsList.Count = 20;
            //NewsList.Heading = ServiceLocator.Current.GetInstance<LocalizationService>().GetString("/newspagetemplate/latestnews");
            //NewsList.IncludeIntroduction = true;
            //NewsList.IncludePublishDate = true;
            //NewsList.Recursive = true;
            //NewsList.PageTypeFilter = typeof(ArticlePageData).GetPageType();
            //NewsList.SortOrder = (int)FilterSortOrder.PublishedDescending;
        }
    }
}